package com.pf.exception;

import com.pf.enums.ResultRespEnum;
import lombok.Getter;

/**
 * @author PanFei
 * @version 1.0.0
 * @createTime 2022/6/25 17:50
 */
@Getter
public class BusinessException extends RuntimeException {

    private Integer code;

    public BusinessException(Integer code, String message) {
        super(message);
        this.code = code;
    }

    public BusinessException(String message) {
        super(message);
        this.code = ResultRespEnum.FAIL.getCode();
    }

}
